package com.bjsxt.livegoods.details.service.service.impl;

import com.bjsxt.livegoods.details.service.service.DetailsService;
import com.bjsxt.livegoods.entity.Product;
import com.bjsxt.livegoods.dao.product.ProductDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * 详细查看服务提供者-服务实现
 */
@Service
public class DetailsServiceImpl implements DetailsService {
    @Autowired
    private ProductDao productDao;

    //@Cacheable(cacheNames = "com:livegoods:details", key = "'getDetails('+#id+')'")
    @Override
    public Product findById(String id) {
        return this.productDao.findById(id);
    }
}
